---
import SignedOutCSR from './SignedOutCSR.astro';
import SignedOutSSR from './SignedOutSSR.astro';

import { isStaticOutput } from 'virtual:@clerk/astro/config';

type Props = {
  isStatic?: boolean;
  /**
   * The class name to apply to the outermost element of the component.
   * This class is only applied to static components.
   */
  class?: string;
};

const { isStatic, class: className } = Astro.props;

const SignedOutComponent = isStaticOutput(isStatic) ? SignedOutCSR : SignedOutSSR;
---

<SignedOutComponent class={className}>
  <slot />
</SignedOutComponent>
